#import "./epic.fragment.graphql"

query epicChildEpics(
  $fullPath: ID!
  $iid: ID!
  $state: EpicState
  $sort: EpicSort
  $timeframe: Timeframe
  $labelName: [String!] = []
  $authorUsername: String = ""
  $confidential: Boolean
  $search: String = ""
  $withColor: Boolean = false
) {
  group(fullPath: $fullPath) {
    id
    name
    epic(iid: $iid) {
      id
      title
      hasChildren
      children(
        state: $state
        sort: $sort
        labelName: $labelName
        authorUsername: $authorUsername
        confidential: $confidential
        search: $search
        timeframe: $timeframe
      ) {
        edges {
          node {
            ...BaseEpic
            color @include(if: $withColor)
            textColor @include(if: $withColor)
          }
        }
      }
    }
  }
}
